Detailed employee information by phone number

This request is used to get detailed information about the client's employee by his phone number.

Request syntax

POST https://b2b-api.go.yandex.ru/integration/2.0/users/by_phone

Request headers

  • Authorization: Bearer <OAuth-token>
    OAuth access token. The steps to get a token are described in Getting started.
  • X-YaTaxi-Selected-Corp-Client-Id — client ID from the account. Required if multiple clients are available using the token.

Request body

Data for the cost center is passed in the request body in JSON format:

Field

Description

Format

Required

phone

The employee's phone number as +7XXXXXXXXXX.

String

Yes

Response field description

Responses may contain the following fields:

Field Description Format
id The employee's ID. String
fullname The employee's full name. String
nickname The employee's short name. In the interface of the Corporate Client Dashboard, it is the ID field in the external system. String
is_active Indicates that the employee is active. An inactive employee can't place an order and rides can't be ordered in their name. Boolean
is_deleted Indicates whether the employee was archived. Boolean
email The employee's email address. String
cost_centers_id ID of the cost center settings (if the client has new cost centers). Optional field. String
limits The limits on the amount the employee can spend on a specific service in a calendar month. An array of elements that contains a separate element for each service.

Structure of the limits array element:

Field

Description

Format

Required

limit_id

The ID of a previously created limit. This ID will be assigned to a user.

String

Yes

service

The service name. Acceptable values:

  • taxi: Yandex Go;

  • eats2: Yandex Eats and Yandex Grocery;

  • drive: Car sharing;

  • tanker: Yandex Fuel;

  • cargo: Cargo transportation;

  • travel: Yandex Travel;

  • scooters: Yandex Scooters.

String

Yes

Request example

POST https://b2b-api.go.yandex.ru/integration/2.0/users/by_phone
...
Authorization: Bearer <OAuth token>

  {
      "phone": "+79011111111"
  }

Response example

An example response to this request looks like this:

{
  "items": [
    {
      "id": "43ed...09f0",
      "fullname": "Ivan Ivanov",
      "is_deleted": false,
      "is_active": true,
      "limits": [
        {
          "limit_id": "d4c9...6c58",
          "service": "taxi"
        },
        {
          "limit_id": "473e...23f8",
          "service": "eats2"
        },
        {
          "limit_id": "3359...1048",
          "service": "drive"
        },
        {
          "limit_id": "ef72...859b",
          "service": "cargo"
        },
        {
          "limit_id": "0431...dbf6",
          "service": "travel"
        }
      ],
      "email": "email",
      "cost_centers_id": "2c53...6911",
      "nickname": ""
    }
  ]
}

Response codes

The response to this request may contain the following standard HTTP codes:

  • 200: Request completed successfully.

  • 401: The OAuth token is incorrect.

  • 403: The client doesn't have sufficient rights to run this request:

    • SELECT_CLIENT_HEADER_REQUIRED: the request did not pass the header X-YaTaxi-Selected-Corp-Client-Id (returned if more than one client is available for the token).

    • SELECTED_CLIENT_ACCESS_DENIED: the header X-YaTaxi-Selected-Corp-Client-Id contains the client's ID, which this login does not have access to.

combined service

Hotels